<?
class App_taskModel extends AppModel {
    protected $tableName='task';
    protected $_map=array(//字符映射
        'content'=>'remark',
        'creatTime'=>'datetime',
        'excuteTime'=>'starttime',
        'finishTime'=>'realtime',
        'creator'=>'creator_name',//创建人
        'follower'=>'follower_name',//跟进人
        'participator'=>'member_name',//参与人
        'progressTime'=>'progresstime',
        'progress'=>'progress_remark',//进度内容
        'mode'=>'materiality',//重要性
    );
    //获取全部任务
    public function task($map){
        $check=D('task')->alias('t')->where($map)->field('title,remark,datetime,starttime,realtime,creator_name,follower_name,member_name,progresstime,progress_remark,materiality')->select();
        $data = $check?$this->parseFieldsMap($check):'';
        return $data;
    }

}